home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20021006-20030409 / 000316_fdc@columbia.edu_Sun Feb 16 16:52:11 EST 2003.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  77 lines

  1. Article: 14112 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!news.columbia.edu!news-not-for-mail
  3. From: fdc@columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.unix.misc,comp.protocols.kermit.misc
  5. Subject: Re: Nasty nulls in FTP
  6. Date: 16 Feb 2003 16:51:17 -0500
  7. Organization: Columbia University
  8. Lines: 60
  9. Message-ID: <b2p14l$5f7$1@watsol.cc.columbia.edu>
  10. References: <1194685a.0302131007.4d6c674f@posting.google.com> <m1wuk37a6p.gnus@usa.net> <3e4ccd43$3_3@news.iglou.com> <nasty.nulls.on.the.internet@helpful.aq>
  11. NNTP-Posting-Host: watsol.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 1045432281 17771 128.59.39.139 (16 Feb 2003 21:51:21 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 16 Feb 2003 21:51:21 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.unix.misc:59682 comp.protocols.kermit.misc:14112
  16.  
  17. In article <nasty.nulls.on.the.internet@helpful.aq>,
  18. Helpful Observer  <observer@helpful.aq> wrote:
  19. : On 13 Feb 2003 10:07:47 -0800, generic*arigatoo.net wrote...
  20. : > 
  21. : > I'm transferring files from a OS/3900 mainframe to a Unix box.  The   
  22. : > mainframe data contains nulls (x00), which causes lines in the data to
  23. : > be truncated in transit.
  24. : > 
  25. : > Is there an FTP option to handle this?
  26. : Somebody gave advice to simply use the 'binary' mode of the
  27. : FTP protocol.  This may not be the whole problem.
  28. : First of all, I suggest that you consider whether some part
  29. : of this IBM-mainframe data is textual, with characters encoded
  30. : in EBCDIC, rather than in ASCII.  Hardly any computers other
  31. : than IBM mainframes use EBCDIC these days, and your Unix
  32. : machine will need to see ASCII.  Converting between the two
  33. : encodings is possible but there are pitfalls for the unwary.
  34. FTP text mode these days means ASCII; the client sends TYPE A
  35. and the server agrees or not.  If it disagrees, the client
  36. presumably stops right there; therefore if you downloaded in
  37. text mode, the server should have translated EBCDIC to ASCII.
  38. But if it really is text, you still wouldn't find NULs in it.
  39. At least not unless they are record padding or somesuch.
  40.  
  41. In that case, there's always the chance the file was transferred
  42. correctly, but your Unix software stops when it sees a NUL.
  43. If you load the file into EMACS, you might be pleasantly surprised
  44. to see the whole thing, but with a bunch of ^@'s mixed in, which
  45. you can easily remove.
  46.  
  47. : Another poster mentioned Kermit, and that's not a bad idea,
  48. : since the Kermit protocol was designed to be able to handle
  49. : data transfers involving EBCDIC-to-ASCII translation.  Try
  50. :         http://www.columbia.edu/kermit/
  51. : BUT, is the data really a pure stream of text characters, or is it
  52. : data with some arbitrary encoding?
  53. :
  54. Exactly.  File transfer is one thing, application-specific data
  55. conversion is another, usually accomplished by "export" and "import"
  56. functions in the application itself.  In any case IBM Mainframe
  57. Kermit gives you some options to deal with different record formats,
  58. depending on the underlying OS (CMS, TSO, etc).  IBM Mainframe
  59. Kermit is here:
  60.  
  61.   http://www.columbia.edu/kermit/k3270.html
  62.  
  63. : I hope you are not expecting
  64. : to copy a DB2 database from the IBM machine and plop the raw
  65. : file onto some Sun box running Oracle and watch it 'just work'!
  66. Right.  Not only is character encoding different, so (in all
  67. likelihood) is internal format for numbers and other data types.
  68.  
  69. - Frank
  70.